﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using IHISCETeim.BLL;
using IHISCETeim.Library;
using IHISCETeim.Model;


namespace IHISCETeim.Web.MachineSys.WModel
{
    public partial class WOITMDetailInputStock : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.查看,Permission.新增 };
            }
        }

        protected override string DWZRef
        {
            get { return "WOITMDetailInputStock"; }
        }


        protected void Page_Load(object sender, EventArgs e)
        {
            if (GetRequestValue<string>("ajaxmethod", "") == "add")
            {
                addmenu();
            }
        }

        protected void addmenu()
        {
            string ItemCodes, OperateTypes, Quantitys, OperateUser, OperateDocNums, OperateRemarks;
            ItemCodes = GetRequestValue<string>("ItemCode", "");
            OperateTypes = GetRequestValue<string>("OperateType", "");
            Quantitys = GetRequestValue<string>("Quantity", "");
            OperateUser = User.RealName;
            OperateDocNums = GetRequestValue<string>("OperateDocNum", "");
            OperateRemarks = GetRequestValue<string>("OperateRemark", "");

            if (WOITMController.AddInputStockDetail(ItemCodes, OperateTypes, Quantitys, OperateUser, OperateDocNums, OperateRemarks) == 1)
            {
                SuccessJson("已成功入库");
            }
            else
            {
                AlertJson("入库失败");
            }

        }
    }
}